//
//  LoginCodeVC.swift
//  whale
//
//  Created by topnet on 2022/3/29.
//

import UIKit

class LoginCodeVC: LoginBaseVC {
    
    var phone: String?
    
    override func viewDidLoad() {
        super.viewDidLoad()

        
    }
    
    override func initUI() {
        super.initUI()
        titleLbl.text = "请输入验证码"
        nextBtn.setTitle("登录", for: .normal)
        codeTf.config.style = .border(width: 1, color: .placeholder, corner: 3.adapter)
        contentV.da.addSubviews(sub: [nextBtn, codeTf])
        codeTf.textChangeClosure = { [weak self] _, isFinish in
            self?.nextBtn.isEnabled = isFinish
        }
    }
    
    override func actionNext() {
        view.endEditing(false)
        self.navigationController?.pushViewController(MeVC(), animated: true)
    }
        
    override func initFrame() {
        super.initFrame()
        codeTf.left_right_offsetTop(titleLbl, x: 30.adapter).height(44.adapter)
        nextBtn.top(codeTf.frame.maxY + 30.adapter)
    }
    

    private lazy var codeTf = ICSingleTextField()

}
